package com.LearnInWorld.video.feign;

import com.LearnInWorld.entity.Result;
import com.LearnInWorld.video.pojo.Course;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(name = "LearnInWorld-service-video",contextId = "courseClient")
@RequestMapping("/course")
@Repository
public interface CourseFeign {


    @RequestMapping("/findList")
    public Result<List<Course>> findLIst();

    @RequestMapping("/findCourse/{courseId}")
    public Result<Course> findCourseById(@PathVariable("courseId") String courseId);

}
